package cn.walnut.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @program: walnut-security
 * @Date: 2018/12/18 0:06
 * @Author: Walnut1992
 * @Description:
 */
@Controller
public class HelloController {

    @RequestMapping("index")
    @ResponseBody
    public String hello(){
        return "hello world!";
    }

    @GetMapping({"/", ""})
    public String index() {
        return "redirect:/index";
    }
}
